package commons.base.grpc;


import javax.net.ssl.KeyManagerFactory;

import io.grpc.Server;
import io.grpc.netty.NettyServerBuilder;
import io.netty.handler.ssl.SslContextBuilder;

public class GrpcServer {

	public static void main(String[] args) throws Exception {
		Server server = NettyServerBuilder.forPort(80)
				.addService(new RouteGuideImpl())
		        .sslContext(SslContextBuilder.forServer(KeyManagerFactory.getInstance("")).build())
		        .maxMessageSize(1)
				.build().start();	

		server.awaitTermination();
		server.shutdownNow();
	}

}
